package com.itheima.health.dao;

import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author spt
 * @description 预约设置DAO
 * @date 2019/9/29
 **/
@Mapper
public interface OrderSettingDao {
    /* 根据指定日期获取预约号数信息 */
    OrderSetting getOrderSettingByDate(@Param("date") String orderDate);

    boolean add(OrderSetting orderSetting);



    Long countNumberExist(Date orderDate);

    void update(OrderSetting orderSetting);

    void insert(OrderSetting orderSetting);

    List<OrderSetting> selectbydate(String date);


    /**
     * 查询该日期的预约信息表单数据
     * @return
     */
    OrderSetting selectIdTotal(Date orderDate);

    /**
     * 添加当天已完成预约人数
     * @param orderSetting
     */
    void increaseReservations(OrderSetting orderSetting);
}
